#include "Vector.h"

jfw::Vector2f::Vector2f()
{
    this->x = 1;
    this->y = 1;
    this->d = sqrt(x^2+y^2);

    this->Normalize();
}

jfw::Vector2f::Vector2f(float x, float y)
{
    this->x = x;
    this->y = y;

    this->d = sqrt(x^2+y^2);
}

jfw::Vector2f::~Vector2f()
{
    this->x = 0;
    this->y = 0;
}

void jfw::Vector2f::Normalize()
{
    this->x = (this->x)/d;
    this->y = (this->y)/d;
}

jfw::Vector2f jfw::Vector2f::GetNormalized()
{
    return Vector2f((this->x)/d,(this->y)/d);
}
